<?php

class Zend_View_Helper_IsValidUser {

    function isValidUser($user) {
        $tableUsers = new Application_Model_DbTable_Users();
        $result = $tableUsers->fetchAll(
                                $tableUsers->select()->from($tableUsers)
                                ->where('username = ?', $user)
                                ->where('disabled = ?', true)
        );
        return count($result)!=0 ? true : false;
    }

}